package com.tanhua.server.controller;

import com.tanhua.model.vo.HuanXinUserVo;
import com.tanhua.server.service.HuanXinService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Pan Rundong
 * @Date 2023-03-04 15:33
 * @Desc 环信控制器
 */
@RestController
@RequestMapping("/huanxin")
public class HuanXinController {
    @Autowired
    private HuanXinService huanXinService;

    /**
     * 获取环信用户
     *
     * @param
     * @return org.springframework.http.ResponseEntity<com.tanhua.model.vo.HuanXinUserVo>
     * @Author Pan Rundong
     */
    @GetMapping("/user")
    public ResponseEntity<HuanXinUserVo> getHuanXinUser() {
        //1.调用service
        HuanXinUserVo vo = huanXinService.getHuanXinUser();
        //2.返回
        return ResponseEntity.ok(vo);
    }
}
